/*
 * Windy - Level Editor for Isometric Tile-based Games
 * Copyright (C) 2009 Ricardo J. Ricken (Darkl0rd)
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

#ifndef WINDY_DOCUMENT_HPP
#define WINDY_DOCUMENT_HPP

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif

#include <wx/vector.h>
#include "windy_tileset.hpp"

class WindyDocument
{
public:
   WindyDocument(const wxString &name, const wxSize &size)
   : doc_name(name), grid_sz(size)
   {
   }

   ~WindyDocument() {
   }

   wxString name() const { return doc_name; }
   const wxSize &size() const { return grid_sz; }
   int width() const { return grid_sz.x; }
   int height() const { return grid_sz.y; }

   int addTileset (WindyTileset &ts) {
      tilesets.push_back(ts);
      return tilesets.size() - 1;
   }

   WindyTileset &getTileset (int index) {
      wxASSERT(index < (int)tilesets.size());
      return tilesets.at(index);
   }

   wxVector<WindyTileset>::size_type numTilesets() const {
      return tilesets.size();
   }

private:
   wxString doc_name;
   wxSize grid_sz;
   wxVector <WindyTileset> tilesets;
};

#endif //~WINDY_DOCUMENT_HPP